//
//  CCDBaseViewController.h
//  crowd
//
//  Created by 马腾飞 on 16/4/8.
//  Copyright © 2016年 caocaod.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CCDHttpBaseTool.h"
#import "Masonry.h"
#import "UIView+Toast.h"
#import "NSString+Helper.h"
#import "NSDictionary+Helper.h"
#import "NSArray+Helper.h"
#import "RSAUtil.h"
#import "AESSecurityTool.h"
#import "MJRefresh.h"
#import "MJRefreshFooter.h"
#import "MJRefreshHeader.h"
#import <ReactiveObjC/ReactiveObjC.h>
#import "AFHTTPSessionManager.h"
#import "CCDRefreshView.h"
#import "ZBarSDK.h"
#import "LogInManager.h"


typedef void(^SuccessBlock)(id JSON);
typedef void(^FaithBlock)(NSError *error);
@interface CCDBaseViewController : UIViewController 
@property (assign, nonatomic)               NSInteger index;

@property (nonatomic, strong) SuccessBlock successBlock;
@property (nonatomic, strong) FaithBlock faithBlock;

- (void)createAesKey ;

- (void)backAction:(UIButton *)sender;
- (void)setBaseNavWithTitle:(NSString *)title imageName:(NSString *)imageName;

- (void)getWithUrl:(NSString *)url params:(NSDictionary *)params progressView:(UIProgressView *)progressView successBlock:(SuccessBlock)httpSuccess faithBlock:(FaithBlock)httpFaith;
- (void)postWithUrl:(NSString *)url params:(NSDictionary *)params progressView:(UIProgressView *)progressView successBlock:(SuccessBlock)httpSuccess faithBlock:(FaithBlock)httpFaith;
@end
